import math

class Obstacle:
    def __init__(self, obstacle_type, description):
        self.type = obstacle_type
        if obstacle_type == 'polygon':
            self.vertices = description
        elif obstacle_type == 'circle':
            self.center = description[0]
            self.radius = description[1]
        elif obstacle_type == 'ellipse':
            self.F1 = description[0]
            self.F2 = description[1]
            self.short_axis = description[2]
        else:
            raise ValueError('Unknown obstacle type: {}'.format(obstacle_type))
